package com.atguigu.factory.factorymethod.order;

import com.atguigu.factory.factorymethod.pizza.BJCheesePizza;
import com.atguigu.factory.factorymethod.pizza.BJGreekPizza;
import com.atguigu.factory.factorymethod.pizza.Pizza;

/**
 * @author LYJ
 * @Description
 * @date 2021 年 09 月 10 日 上午10:20
 */
public class BJOrderPizza extends OrderPizza {


    @Override
    public Pizza createPizza(String orderType) {
        if ("Cheese".equals(orderType)) {
            BJCheesePizza bjCheesePizza = new BJCheesePizza();
            bjCheesePizza.setName("北京CheesePizza");
            return bjCheesePizza;
        }else if("Greek".equals(orderType)){
            BJGreekPizza bjGreekPizza = new BJGreekPizza();
            bjGreekPizza.setName("北京GreekPizza");
            return bjGreekPizza;
        }
        return null;
    }
}
